//    Copyright (C) Kherty.  All rights reserved.
using OpenLS.Core.Serialization;

namespace OpenLS.Spreadsheet
{
    public class WorksheetCalculationProperties: IOfficeXmlSerializable
    {
        #region IOfficeXmlSerializable Members

        void IOfficeXmlSerializable.ReadXml(ReadContext context)
        {
            using (ReadContext c = context.Read("sheetCalcPr"))
            {
                FullCalculationOnLoad = c.GetOptionalBoolean("fullCalcOnLoad", false);
            }
        }

        void IOfficeXmlSerializable.WriteXml(WriteContext context)
        {
            using (WriteContext c = context.Write("sheetCalcPr"))
            {
                c.SetOptionalBoolean("fullCalcOnLoad", FullCalculationOnLoad, false);
            }
        }

        #endregion

        private bool fullCalcOnLoad;

        public bool FullCalculationOnLoad
        {
            get { return fullCalcOnLoad; }
            set { fullCalcOnLoad = value; }
        }
	
    }
}
